package com.ruoyi.project.labapprove.mapper;

import com.ruoyi.project.lab.domain.LabAppointmentDto;
import com.ruoyi.project.labapprove.domain.ApproveParam;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface LabApproveMapper {

    List<LabAppointmentDto> selectList(@Param("approveParam") ApproveParam approveParam);

    @Update("update lab_subscribe set status=1 where id=#{id}")
    int audit(@Param("id") Long id);
    @Update("update lab_subscribe set status=2 where id=#{id}")
    int auditRefuse(@Param("id")Long id);

    @Select("select lab_date_id from lab_subscribe where id=#{id}")
    Long selectlabDateId(@Param("id") Long id);

    @Update("update lab_date set status=2 where id=#{labDateId}")
    void updateLabDateStatus(@Param("labDateId") Long labDateId);
}
